﻿Imports System.ComponentModel
Imports System.Drawing

Public Class AxisProp
    Inherits GPropLayer

    Public Sub New(ByVal ln As String, ByVal fn As String, ByVal lt As LAYERTYPE, ByVal bs As Boolean)
        MyBase.New(ln, fn, lt, bs)

        '下面添加属于自己特有的属性
        m_IsShowTop = False
        m_IsShowLeft = True
        m_IsShowRight = False
        m_IsShowBottom = True

        m_IsShowText = True
        m_IsShowScale = True

        m_XCells = 1
        m_YCells = 1
        m_LBPointXA = 0
        m_LBPointYA = 0
        m_LBPointY = 0
        m_LBPointX = 0

        m_ScaleL = 5




    End Sub
#Region "坐标轴特有事件模型"
    'Public Event IsShowTopChanged(ByVal ln As String, ByVal b As Boolean)
    'Public Event IsShowBottomChanged(ByVal ln As String, ByVal b As Boolean)
    'Public Event IsShowLeftChanged(ByVal ln As String, ByVal b As Boolean)
    'Public Event IsShowRightChanged(ByVal ln As String, ByVal b As Boolean)

    Public Event NeedForRedraw(ByVal ap As AxisProp)

#End Region
    Dim m_IsShowTop As Boolean
    <CategoryAttribute("特定设置"), _
  DisplayName("显示上边轴")> _
   Public Property IsShowTopProperty() As Boolean
        Get
            Return m_IsShowTop
        End Get
        Set(ByVal value As Boolean)
            m_IsShowTop = value

            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_IsShowBottom As Boolean
    <CategoryAttribute("特定设置"), _
  DisplayName("显示下边轴")> _
   Public Property IsShowBottomProperty() As Boolean
        Get
            Return m_IsShowBottom
        End Get
        Set(ByVal value As Boolean)
            m_IsShowBottom = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_IsShowLeft As Boolean
    <CategoryAttribute("特定设置"), _
  DisplayName("显示左边轴")> _
    Public Property IsShowLeftProperty() As Boolean
        Get
            Return m_IsShowLeft
        End Get
        Set(ByVal value As Boolean)
            m_IsShowLeft = value
            RaiseEvent NeedForRedraw(Me)

        End Set
    End Property
    Dim m_IsShowRight As Boolean
    <CategoryAttribute("特定设置"), _
  DisplayName("显示右边轴")> _
    Public Property IsShowRightProperty() As Boolean
        Get
            Return m_IsShowRight
        End Get
        Set(ByVal value As Boolean)
            m_IsShowRight = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_LBPointXA As Double
    <CategoryAttribute("特定设置"), _
 DisplayName("左下点绝对坐标X")> _
   Public Property LBPointXAProperty() As Double
        Get
            Return m_LBPointXA
        End Get
        Set(ByVal value As Double)
            m_LBPointXA = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_LBPointYA As Double
    <CategoryAttribute("特定设置"), _
DisplayName("左下点绝对坐标Y")> _
   Public Property LBPointYAProperty() As Double
        Get
            Return m_LBPointYA
        End Get
        Set(ByVal value As Double)
            m_LBPointYA = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property


    Dim m_LBPointX As Double
    <CategoryAttribute("特定设置"), _
DisplayName("左下点相对坐标X")> _
   Public Property LBPointXProperty() As Double
        Get
            Return m_LBPointX
        End Get
        Set(ByVal value As Double)
            m_LBPointX = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_LBPointY As Double
    <CategoryAttribute("特定设置"), _
DisplayName("左下点相对坐标Y")> _
   Public Property LBPointYProperty() As Double
        Get
            Return m_LBPointY
        End Get
        Set(ByVal value As Double)
            m_LBPointY = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_XCells As Integer
    <CategoryAttribute("特定设置"), _
DisplayName("X轴单元格数")> _
   Public Property XCellsProperty() As Integer
        Get
            Return m_XCells
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then
                value = 0
            End If
            m_XCells = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_YCells As Integer
    <CategoryAttribute("特定设置"), _
DisplayName("Y轴单元格数")> _
   Public Property YCellsProperty() As Integer
        Get
            Return m_YCells
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then
                value = 0
            End If
            m_YCells = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_XunitL As Double
    <CategoryAttribute("特定设置"), _
DisplayName("X轴单元格长度")> _
   Public Property XunitLProperty() As Double
        Get
            Return m_XunitL
        End Get
        Set(ByVal value As Double)
            If value < 0 Then
                value = 0
            End If
            m_XunitL = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_YuintL As Double
    <CategoryAttribute("特定设置"), _
DisplayName("Y轴单元格长度")> _
   Public Property YuintLProperty() As Double
        Get
            Return m_YuintL
        End Get
        Set(ByVal value As Double)
            If value < 0 Then
                value = 0
            End If
            m_YuintL = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_ScaleL As Double
    <CategoryAttribute("特定设置"), _
DisplayName("刻度线长度")> _
   Public Property ScaleLProperty() As Double
        Get
            Return m_ScaleL
        End Get
        Set(ByVal value As Double)
            If value < 0 Then
                value = 0
            End If
            m_ScaleL = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property


    Dim m_IsShowText As Boolean
    <CategoryAttribute("特定设置"), _
DisplayName("是否显示刻度值")> _
   Public Property IsShowTextProperty() As Boolean
        Get
            Return m_IsShowText
        End Get
        Set(ByVal value As Boolean)
            m_IsShowText = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
   
    Dim m_IsShowScale As Boolean
    <CategoryAttribute("特定设置"), _
DisplayName("是否显示刻度线")> _
   Public Property IsShowScaleProperty() As Boolean
        Get
            Return m_IsShowScale
        End Get
        Set(ByVal value As Boolean)
            m_IsShowScale = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property




    '重写的一些属性,下面主要是与点相关的部分，呵呵
    <CategoryAttribute("外观设置"), _
   DisplayName("点类型"), _
   BrowsableAttribute(False)> _
   Public Overrides Property PointtypeProperty() As MapWinGIS.tkPointType
        Get

        End Get
        Set(ByVal value As MapWinGIS.tkPointType)



        End Set
    End Property

    <BrowsableAttribute(False)> _
   Public Overrides Property PointColorProperty() As Color
        Get

        End Get
        Set(ByVal value As Color)

        End Set
    End Property


    <BrowsableAttribute(False)> _
    Public Overrides Property PointsizeProperty() As Double
        Get

        End Get
        Set(ByVal value As Double)

        End Set
    End Property



    <BrowsableAttribute(False)> _
    Public Overrides Property PtUdpImgProperty() As String
        Get

        End Get

        Set(ByVal value As String)

        End Set
    End Property

End Class
